From c2d4466603c912aab4d01c756a9e99ccd3ba84de Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 20 Feb 2003 15:55:05 +0000 Subject: [PATCH] Add deficon, geocache icon generation capabilities, and lookup of icons from mapsource tables. --- pcx.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pcx.c b/pcx.c index 0e7244706..04d65838a 100644 --- a/pcx.c +++ b/pcx.c @@ -25,9 +25,15 @@ static FILE *file_in; static FILE *file_out; static void *mkshort_handle; +static char *deficon = "Waypoint"; #define MYNAME "PCX" +static +arglist_t pcx_args[] = { + {"deficon", &deficon, "Default icon name"}, + {0, 0, 0} +}; static void rd_init(const char *fname, const char *args) @@ -100,7 +106,7 @@ gpsutil_disp(const waypoint *wpt) { double lon,lat; signed int ilon, ilat; - const char *icon_token = "0"; + int icon_token = 0; char tbuf[1024]; char *tp = tbuf; time_t tm = wpt->creation_time; @@ -118,7 +124,13 @@ gpsutil_disp(const waypoint *wpt) tp++; } - fprintf(file_out, "W %-6.6s %c%08.5f %c%011.5f %s %5d %-40.40s %5e %s\n", + icon_token = mps_find_icon_number_from_desc(deficon); + if (get_cache_icon(wpt)) { + icon_token = mps_find_icon_number_from_desc(get_cache_icon(wpt)); + } + + + fprintf(file_out, "W %-6.6s %c%08.5f %c%011.5f %s %5d %-40.40s %5e %d\n", global_opts.synthesize_shortnames ? mkshort(mkshort_handle, wpt->description) : wpt->shortname, @@ -159,4 +171,5 @@ ff_vecs_t pcx_vecs = { wr_deinit, data_read, data_write, + pcx_args }; -- 2.30.2